package com.ycdx.zwzc.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Preparable;
import com.ycdx.zwzc.impl.QueryImpl;
import com.ycdx.zwzc.impl.UserImpl;
import com.ycdx.zwzc.pojo.Request;
import com.ycdx.zwzc.pojo.User;

public class AdminAction extends ActionSupport implements Preparable{
	
	private List<User> userList ;
	private String startTime;
	private String endTime;
	private List<Request> allRequests;
	
	public List<Request> getAllRequests() {
		return allRequests;
	}

	public void setAllRequests(List<Request> allRequests) {
		this.allRequests = allRequests;
	}

	public List<User> getUserList() {
		return userList;
	}

	public void setUserList(List<User> userList) {
		this.userList = userList;
	}
	
	
	
	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}



	private static final long serialVersionUID = 2622623994234008971L;

	public void prepare() throws Exception {
		// TODO Auto-generated method stub
		userList = UserImpl.getAllCommonUser();
	}
	
	/**
	 * 统计查询平台
	 * @return
	 */
	public String dashboard(){
		return INPUT;
	}
	/**
	 * 根据日期查询详细工作
	 * @return
	 */
	public String queryByDate(){
		allRequests = QueryImpl.queryByDate(startTime, endTime);
		return "listQueryResult";
	}


}
